package com.ddy.test.innerClass;

/**
 * Created by ddy on 2020/4/13 5:09 PM
 */

public class FunctionInnerClass {

    private int a = 100;

    public void test(int param) {
        String str = "hello";

        class Inner {
            public void innerMethod() {
                System.out.println("outer a " + a);
                System.out.println("param " + param);
                System.out.println("local var " + str);
            }
        }
        Inner inner = new Inner();
        inner.innerMethod();
    }

    public static void main(String[] args) {
        FunctionInnerClass fc = new FunctionInnerClass();
        fc.test(1);
    }
}

